<?php
if(isset($_POST['login'])){
	$dbconnect = DBconnect::getInstance();
	if($dbconnect->checkLogin(trim($_POST['email']), trim($_POST['password']))){
		if(!isset($_SESSION['manager'])){
			$_SESSION['manager'] = new LoggedManager(trim($_POST['email']));
			header("Location:?page=selectteam");
		}	
	}
	else {
		echo "<div id='incorrectLogin'>Incorrect login details!</div>";	
	}	
}

?>